import { WebPlugin } from '@capacitor/core';
import { ZebraLabelPrinterPlugin } from './definitions';

export class ZebraLabelPrinterWeb extends WebPlugin implements ZebraLabelPrinterPlugin {
  constructor() {
    super({
      name: 'ZebraLabelPrinter',
      platforms: ['web'],
    });
  }

  async echo(options: { value: string }): Promise<{ value: string }> {
    console.log('ECHO', options);
    return options;
  }

  async print(options: {ip: string, port: number, zpl: string }): Promise<{ value:string }> {

    console.log('no webfunctionality available', options);
    let value = {value:'no webfunctionality available'};
    return value;
  }
}

const ZebraLabelPrinter = new ZebraLabelPrinterWeb();

export { ZebraLabelPrinter };

import { registerWebPlugin } from '@capacitor/core';
registerWebPlugin(ZebraLabelPrinter);
